package com.amazon.shop.bean.vo;

import com.amazon.shop.bean.enums.ResultEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * 创建时间：11:50 2021/1/13
 *
 * @author lzj
 * @since JDK 1.8.0_171
 * 类说明：
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ---------------------------------------------------------*
 */
@Data
public class Ret<T> implements Serializable {

    private static final long serialVersionUID = 8268333746115884423L;

    private String code;
    private String servecode;
    private String msg;
    private String taskId;
    private T data;
    public Ret(ResultEnum resultEnum, T data){
        this.code = resultEnum.getCode();
        this.servecode = resultEnum.getServecode();
        this.msg = resultEnum.getMsg();
        this.data = data;
    }

    public Ret(String code,String servecode,String msg,T data){
        this.code = code;
        this.servecode = servecode;
        this.msg = msg;
        this.data = data;
    }
    public Ret(){
    }
}
